package com.srb.common;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

/**
 * @Author 宋伟宁
 * @Date 2024/2/29
 * @Version 1.0
 **/
@Getter
@ToString
@AllArgsConstructor
public enum ResponseEnum {

    SUCCESS(0, "成功"),
    ERROR(-1,"服务器内部错误"),
    BORROW_AMOUNT_NULL_ERROR(-201,"贷款额度不能为零！"),
    SERVLET_ERROR(-202,"请求参数异常！"),
    BAD_SQL_GRAMMAR_ERROR(-101,"sql语句错误");
    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    // 响应状态码
    private Integer code;
        // 响应信息
    private String message;

    ResponseEnum(int i, String message) {
         this.code=i;
         this.message=message;
    }
}
